
package com.compuvest.web;

public class ShipRate implements java.io.Serializable {

// <editor-fold defaultstate="collapsed" desc="init variables">
    public static final String STR_FREE_SHIPPING = "<b style='color:red;'>Free shipping</b>";

    private String shipCode;
    private String description;
    private String day;
    private double shipPrice;
    private double shipAddPrice;
// </editor-fold>

// <editor-fold defaultstate="collapsed" desc="ShipRate()">
    public ShipRate() {
        this("","","");
    }
// </editor-fold>

// <editor-fold defaultstate="collapsed" desc="ShipRate(String shipCode, String description, String day)">
    public ShipRate(String shipCode, String description, String day) {
	this.shipCode       = shipCode;
	this.description    = description;
	this.day            = day;
    }
// </editor-fold>

// <editor-fold defaultstate="collapsed" desc="ShipRate(String shipCode, String description, double price)">
    public ShipRate(String shipCode, String description, double price) {
	this.shipCode       = shipCode;
	this.description    = description;
	this.shipPrice      = price;
    }
// </editor-fold>

// <editor-fold defaultstate="collapsed" desc="get() set()">
    public String getShipCode()                     { return shipCode; }
    public void setShipCode(String shipCode)        { this.shipCode = shipCode; }

    public String getDescription()                  { return description; }
    public void setDescription(String description)  { this.description = description; }

    public String getDay()                          { return day; }
    public void setDay(String day)                  { this.day = day; }

//    public double getShipPrice()	{ return shipPrice == 0.0 ? 0.0 : shipPrice * 1.007 * 1.45 + 1.67 + shipAddPrice; }
    public double getShipPrice() {
        return shipPrice == 0d ? 0d : shipPrice + shipAddPrice;
    }
    public void setShipPrice(double shipPrice, double shipAddPrice) {
	this.shipPrice = shipPrice;
	this.shipAddPrice = shipAddPrice;
    }
// </editor-fold>
}
